package com.commerce.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.commerce.common.entity.Addresses;

import java.util.List;

/**
 * 地址服务接口
 */
public interface AddressService extends IService<Addresses> {

    /**
     * 获取用户地址列表
     */
    List<Addresses> getUserAddresses(Long userId);

    /**
     * 添加地址
     */
    boolean addAddress(Addresses address);

    /**
     * 更新地址
     */
    boolean updateAddress(Addresses address);

    /**
     * 设置默认地址
     */
    boolean setDefaultAddress(Long addressId, Long userId);

    /**
     * 获取用户默认地址
     */
    Addresses getUserDefaultAddress(Long userId);
}
